import request from '../utils/request';
//系统管理的接口
//=============系统菜单==============
// #region
//修改系统菜单  post请求 params传参
export const updateMenu = (params) => request({ url: '/updateMenu', method: 'post', params: params })

//获取系统菜单表格数据  get请求 params传参
export const selectAllMenus = (params) => request({ url: '/selectAllMenus', params: params })

//删除系统菜单  get请求 params传参
export const deleteMenu = (params) => request({ url: '/deleteMenu', params: params })

//添加系统菜单  post请求 data传参
export const addMenus = (params) => request({ url: '/addMenus', method: 'post', data: params })

//搜索系统菜单  get请求 params传参
export const selectAllMenusBymenusname = (params) => request({ url: '/selectAllMenusBymenusname', params: params })
//#endregion

//============系统角色=============
// #region
//获取系统角色表格数据  post请求 params传参
export const selectSystemRoles = (params) => request({ url: '/selectSystemRoles', method: 'post', params: params })

//系统角色用户弹窗表格数据 post请求 params传参
export const selectSystemUserByRole = (params) => request({ url: '/selectSystemUserByRole', method: 'post', params: params })

//获取角色授权 左侧路由栏数据 post请求 无参数
export const selectMenus = () => request({ url: '/selectMenus', method: 'post' })

//获取角色授权弹窗数据 post请求 params传参
export const selectRoleOneMenus = (params) => request({ url: '/selectRoleOneMenus', method: 'post', params: params })

//修改角色权限 post请求 params传参
export const updateRoleMenus = (params) => request({ url: '/updateRoleMenus', method: 'post', params: params })

//修改角色信息 post请求 params传参
export const updateSystemRole = (params) => request({ url: '/updateSystemRole', method: 'post', params: params })

//删除角色信息
export const deleteSystemRole = (params) => request({ url: '/deleteSystemRole', method: 'post', params: params })

//添加角色信息
export const addSystemRole = (params) => request({ url: '/addSystemRole', method: 'post', params: params })
// #endregion

//============系统用户=============
// #region
//获取系统用户表格信息
export const selectSystemUsers = (params) => request({ url: '/selectSystemUsers', method: 'post', params: params })

//查询部门
export const selectbm = () => request({ url: '/selectbm', method: 'post' })

//获取职务
export const selectzw = () => request({ url: '/selectzw', method: 'post' })

//查询单个用户信息
export const selectSystemUserById = (params) => request({ url: '/selectSystemUserById', method: 'post', params: params })

//获取用户角色信息
export const selectUserSystemRoles = (params) => request({ url: '/selectUserSystemRoles', method: 'post', params: params })

//修改用户信息
export const updateSystemUser = (params) => request({ url: '/updateSystemUser', method: 'post', params: params })

//添加用户信息
export const addSystemUser = (params) => request({ url: '/addSystemUser', method: 'post', params: params })

//删除用户信息
export const deleteSystemUser = (params) => request({ url: '/deleteSystemUser', method: 'post', params: params })

//修改用户状态
export const updateSystemUserStatus = (params) => request({ url: '/updateSystemUserStatus', method: 'post', params: params })
// #endregion

//============数据字典==============
//获取字典表格数据
export const selectAllDict1 = (params) => request({ url: '/selectAllDict1', method: 'post', params: params })

//搜索数据字典
export const selectDict1Byname = (params) => request({ url: '/selectDict1Byname', method: 'post', params: params })

//添加数据字典
export const addDict1 = (params) => request({ url: '/addDict1', method: 'post', params: params })

//回显数据字典
export const selectDict1ById = (params) => request({ url: '/selectDict1ById', method: 'post', params: params })

//编辑数据字典
export const updateDict1 = (params) => request({ url: '/updateDict1', method: 'post', params: params })

//删除数据字典
export const deleteDictById = (params) => request({ url: '/deleteDictById', method: 'post', params: params })

//获取2级数据字典
export const selectDict2Byparntid = (params) => request({ url: '/selectDict2Byparntid', method: 'post', params: params })

//添加2级数据字典
export const addDict2 = (params) => request({ url: '/addDict2', method: 'post', params: params })

//编辑2级数据字典
export const updateDict2 = (params) => request({ url: '/updateDict2', method: 'post', params: params })


